using System;
using System.Data;
using System.Collections;
using APP.QUANLY.Common;

namespace RMAS.DAL
{
    /// <summary>
    /// Summary description for QT_QUANTITATIVE.
    /// </summary>
    public class QT_QUANTITATIVE
    {
              private Int64 _ID;
      private string _PrID;
      private string _MeterialID;
      private string _MeterialName;
      private string _UnitName;
      private double _NumberMeterial;
      private double _PriceMeterial;
      private string _IDPOS;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
	      public bool IsSetID; 
      public bool IsIDNullable   
      { 
	 get { return false;  } 
      }
      public Int64 ID
      {
         get { return _ID; }
         set 
	    { 
 		 _ID = value;
		IsSetID = true;
 	    }
      }
    public bool IsSetPrID; 
    public bool IsPrIDNullable   
    { 
		get { return false;  } 
    }
    public string PrID
    {
        get{ return _PrID;  }
        set
		{
			_PrID = value;
			IsSetPrID = true;
		}
    }
    public bool IsSetMeterialID; 
    public bool IsMeterialIDNullable   
    { 
		get { return false;  } 
    }
    public string MeterialID
    {
        get{ return _MeterialID;  }
        set
		{
			_MeterialID = value;
			IsSetMeterialID = true;
		}
    }
    public bool IsSetMeterialName; 
    public bool IsMeterialNameNullable   
    { 
		get { return false;  } 
    }
    public string MeterialName
    {
        get{ return _MeterialName;  }
        set
		{
			_MeterialName = value;
			IsSetMeterialName = true;
		}
    }
    public bool IsSetUnitName; 
    public bool IsUnitNameNullable   
    { 
		get { return false;  } 
    }
    public string UnitName
    {
        get{ return _UnitName;  }
        set
		{
			_UnitName = value;
			IsSetUnitName = true;
		}
    }
    public bool IsSetNumberMeterial; 
    public bool IsNumberMeterialNullable   
    { 
		get { return false;  } 
    }
    public double NumberMeterial
    {
        get{ return _NumberMeterial;  }
        set
		{
			_NumberMeterial = value;
			IsSetNumberMeterial = true;
		}
    }
    public bool IsSetPriceMeterial; 
    public bool IsPriceMeterialNullable   
    { 
		get { return false;  } 
    }
    public double PriceMeterial
    {
        get{ return _PriceMeterial;  }
        set
		{
			_PriceMeterial = value;
			IsSetPriceMeterial = true;
		}
    }
    public bool IsSetIDPOS; 
    public bool IsIDPOSNullable   
    { 
		get { return false;  } 
    }
    public string IDPOS
    {
        get{ return _IDPOS;  }
        set
		{
			_IDPOS = value;
			IsSetIDPOS = true;
		}
    }

        #endregion

        #region Constructors
        public QT_QUANTITATIVE()
        {
            Reset();
        }
        public QT_QUANTITATIVE(QT_QUANTITATIVE obj)
        {
            	this._ID = obj.ID;
	this._PrID = obj.PrID;
	this._MeterialID = obj.MeterialID;
	this._MeterialName = obj.MeterialName;
	this._UnitName = obj.UnitName;
	this._NumberMeterial = obj.NumberMeterial;
	this._PriceMeterial = obj.PriceMeterial;
	this._IDPOS = obj.IDPOS;
        }
        #endregion

        public void Reset()
        {
                     _ID = EmptyValues.v_Int64;
         _PrID = EmptyValues.v_string;
         _MeterialID = EmptyValues.v_string;
         _MeterialName = EmptyValues.v_string;
         _UnitName = EmptyValues.v_string;
         _NumberMeterial = EmptyValues.v_double;
         _PriceMeterial = EmptyValues.v_double;
         _IDPOS = EmptyValues.v_string;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["ID"] is DBNull))
		{
			obj.ID = (Int64)reader["ID"];
		}
                if(!(reader["PrID"] is DBNull))
		{
			obj.PrID = (string)reader["PrID"];
		}
                if(!(reader["MeterialID"] is DBNull))
		{
			obj.MeterialID = (string)reader["MeterialID"];
		}
                if(!(reader["MeterialName"] is DBNull))
		{
			obj.MeterialName = (string)reader["MeterialName"];
		}
                if(!(reader["UnitName"] is DBNull))
		{
			obj.UnitName = (string)reader["UnitName"];
		}
                if(!(reader["NumberMeterial"] is DBNull))
		{
			obj.NumberMeterial = (double)reader["NumberMeterial"];
		}
                if(!(reader["PriceMeterial"] is DBNull))
		{
			obj.PriceMeterial = (double)reader["PriceMeterial"];
		}
                if(!(reader["IDPOS"] is DBNull))
		{
			obj.IDPOS = (string)reader["IDPOS"];
		}
//            _ID = (reader["ID"] is DBNull)?DalTools.EmptyValues.v_Int64:(Int64)reader["ID"];
//            _PrID = (reader["PrID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["PrID"];
//            _MeterialID = (reader["MeterialID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MeterialID"];
//            _MeterialName = (reader["MeterialName"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MeterialName"];
//            _UnitName = (reader["UnitName"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["UnitName"];
//            _NumberMeterial = (reader["NumberMeterial"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["NumberMeterial"];
//            _PriceMeterial = (reader["PriceMeterial"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["PriceMeterial"];
//            _IDPOS = (reader["IDPOS"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["IDPOS"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int64 ID, string PrID, string MeterialID, string MeterialName, string UnitName, double NumberMeterial, double PriceMeterial, string IDPOS)
        {
                     this._ID = ID;
         this._PrID = PrID;
         this._MeterialID = MeterialID;
         this._MeterialName = MeterialName;
         this._UnitName = UnitName;
         this._NumberMeterial = NumberMeterial;
         this._PriceMeterial = PriceMeterial;
         this._IDPOS = IDPOS;
        }
    }
}